import request from "@/plugins/request";

var pre = "/repair";

if (process.env.NODE_ENV !== "development") {
  pre = "/api/sa/conv-app" + pre;
}


export function getUserInfo() {
  return request({
    url: `${pre}/getUserInfo`,
    method: "get",
  });
}

export function getRepairPageInfoForAdmin(data) {
  return request({
    url: `${pre}/getRepairPageInfoForAdmin`,
    method: "post",
    data: data
  });
}

export function getRepairPageInfo(data) {
  return request({
    url: `${pre}/getRepairPageInfo`,
    method: "post",
    data: data
  });
}


export function apply(data) {
  return request({
    url: `${pre}/apply`,
    method: "post",
    data: data
  });
}


export function cancel(repairInfoId) {
  return request({
    url: `${pre}/cancel?repairInfoId=${repairInfoId}`,
    method: "get",
  });
}



export function checkAssetsFlag() {
  return request({
    url: `${pre}/checkAssetsFlag`,
    method: "get",
  });
}

export function getPreRepairInfo() {
  return request({
    url: `${pre}/getPreRepairInfo`,
    method: "get",
  });
}

export function getFdzyXxjjfcxxs() {
  return request({
    url: `${pre}/getFdzyXxjjfcxxs`,
    method: "get",
  });
}

export function queryLouyEquipment(swid) {
  return request({
    url: `${pre}/queryLouyEquipment?swid=${swid}`,
    method: "get",
  });
}

export function queryFuwEquipment(swid) {
  return request({
    url: `${pre}/queryFuwEquipment?swid=${swid}`,
    method: "get",
  });
}


export function getRepairInfo(repairInfoId) {
  return request({
    url: `${pre}/getRepairInfo?repairInfoId=${repairInfoId}`,
    method: "get",
  });
}

